package com.mathdroid.model.abilities.specs.sniper;

import com.mathdroid.model.abilities.Ability;
import com.mathdroid.model.enums.EDmgType;

public final class ExplosiveProbe extends Ability {

	/*
	 * We are only interested in "hard" targets (toughness = 4). So we don't
	 * care about the DoT.
	 */
	
	/**
	 * Generated UID.
	 */
	private static final long serialVersionUID = -1397473463870383554L;

	public ExplosiveProbe() {
		this.setName("Explosive Probe");
		this.setIconName("explosiveprobe");
		this.setResource("Energy");
		this.setCost(20d);
		this.setCooldownMs(30000d);
		this.setDirectDamageType(EDmgType.KINETIC);
		this.setPeriodicDamageType(EDmgType.ELEMENTAL);
		this.setStandardHealthPercentMax(0.25);
		this.setStandardHealthPercentMin(0.23);
		this.setAmountModifierPercent(0.01);
		this.setCoefficient(2.4);
		this.setTrainableLevel(1);
	}
	
	@Override
	public String getDescription() {
		return "Puts an explosive probe on the target that detonates " +
		"when the target takes damage, dealing " + this.getMinDirect() + " - " 
		+ this.getMaxDirect() + " " +
		"kinetic damage to the target. Standard and weak " +
		"targets are additionally knocked down and set on " +
		"fire, dealing (?) additional elemental damage over " +
		"3 seconds. Can only be used from cover.";
	}

	@Override
	public double getMinPeriodic() {
		return 0d;
	}

	@Override
	public double getMaxPeriodic() {
		return 0d;
	}

	@Override
	public double getMinDirect() {
		return
			this.getAmountModifierPercent() 
			* this.getCharStats().getRangedDamagePrimaryMin()
		
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
		
			+ this.getStandardHealthPercentMin() 
			* this.getStdDmg();
	}

	@Override
	public double getMaxDirect() {
		return
			this.getAmountModifierPercent() 
			* this.getCharStats().getRangedDamagePrimaryMax()
		
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
		
			+ this.getStandardHealthPercentMax() 
			* this.getStdDmg();
	}

}
